<!--- Check for existance of picture directory, if does not exist create it --->

<cfdirectory name="ifexsists" action="list" directory="#expandpath("\images")#\#form.contractID#">
<cfif #ifexsists.recordcount# lt 1>
	<cfdirectory action="create" directory="#expandpath("\images")#\#form.contractID#">
</cfif>

<CFOUTPUT>
		<CFTRY>
			<cffile action="upload" filefield="file-0" destination="#expandpath("\images")#\#form.contractID#" nameConflict="makeUnique">
		<cfcatch>
			#cfcatch.Message#
		</cfcatch>
		</cftry>
		Uploaded #cffile.serverFile#
</CFOUTPUT>
<!---
<cfdump var="#form#">
--->